package org.example.jdkproxy;

import java.lang.reflect.Proxy;

public class ProxyFactory {
    public static <T> T getProxy(Class<T> cls, T target) {
        return (T) Proxy.newProxyInstance(cls.getClassLoader(), new Class[]{cls}, new MethodProxy(target));
    }
}
